From: Bastien Nocera Date: Mon, 4 Dec 2017 13:30:01 +0000 (+0100) Subject: dateMenu: Ignore malformed world-clocks settings X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~994^2^2~137 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=a29ceb31dda85c8ae025b7222f6d75bf7b2ff478;p=gnome-shell.git dateMenu: Ignore malformed world-clocks settings Guard against a malformed setting that doesn't contain a 'location' key. https://bugzilla.gnome.org/show_bug.cgi?id=791148 --- diff --git a/js/ui/dateMenu.js b/js/ui/dateMenu.js index 1d48fa8bd..5908c904f 100644 --- a/js/ui/dateMenu.js +++ b/js/ui/dateMenu.js @@ -132,6 +132,8 @@ var WorldClocksSection = new Lang.Class({ let world = GWeather.Location.get_world(); let clocks = settings.get_value('world-clocks').deep_unpack(); for (let i = 0; i < clocks.length; i++) { + if (!clocks[i].location) + continue; let l = world.deserialize(clocks[i].location); this._locations.push({ location: l }); }